package net.awpspace.mobile.management.house;

public class AwpDate {
	private int day;
	private int month;
	private int year;
	
	
	public AwpDate(int day, int month, int year) {
		super();
		this.day = day;
		this.month = month;
		this.year = year;
	}
	public AwpDate(String date) {
		String part = "/";
		String d,m,y;
		int index = date.indexOf(part);
		d = date.substring(0, index);
		date = date.substring(index + 1);
		
		index = date.indexOf(part);
		m = date.substring(0, index);
		date = date.substring(index + 1);
		
		y = date;
		this.day = Integer.parseInt(d);
		this.month = Integer.parseInt(m);
		this.year = Integer.parseInt(y);
	}
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	
	public String toString(){
		return day+"/"+month+"/"+year;
	}
	
}
